﻿@using CuongHanh.Models
@model CuongHanh.Models.NotMapDB.ChangePassword
@{
    Layout = "../Shared/_GemLayout.cshtml";
    ViewBag.Title = "Đổi mật khẩu";
}

@if(ViewBag.GetPage == "get")
{
    <div class="content">
        <div class="block account">
            <p class="title">@Html.GetResource("changepassword")</p>
            @using (Html.BeginForm("ChangePassword",
                    "Customer",
                    FormMethod.Post))
            {
                if(!string.IsNullOrWhiteSpace(ViewBag.Message))
                {
                    <div style="height: 30px; width: 100%;">
                        @ViewBag.Message
                    </div>
                }

                @Html.AntiForgeryToken()

                <div class="form login">
                    <div class="field">
                        @Html.LabelFor(c => c.OldPassword,
                                Html.GetResource("oldpassword"),
                                new
                                {
                                        @class = "field_L",
                                        style = "width:100%;"
                                })
                        @Html.PasswordFor(c => c.OldPassword,
                                new
                                {
                                        style = "width:93%;"
                                })
                    </div>
                    <div class="field">
                        @Html.LabelFor(c => c.Password,
                                Html.GetResource("password"),
                                new
                                {
                                        @class = "field_L",
                                        style = "width:100%;"
                                })
                        @Html.PasswordFor(c => c.Password,
                                new
                                {
                                        style = "width:93%;"
                                })
                    </div>
                    <div class="field">
                        @Html.LabelFor(c => c.VerifyPassword,
                                Html.GetResource("verifypassword"),
                                new
                                {
                                        @class = "field_L",
                                        style = "width:100%;"
                                })
                        @Html.PasswordFor(c => c.VerifyPassword,
                                new
                                {
                                        style = "width:93%;"
                                })
                    </div>

                    <div class="field_btn">
                        <input class="btn_blue" type="submit" value="@Html.GetResource("changepassword")" style="margin-left: 30px;" />
                    </div>
                </div>
            }</div></div>
}
else
{
    if(!string.IsNullOrWhiteSpace(ViewBag.Message))
    {
        <div style="margin:40px;"></div>
        <h3 >@ViewBag.Message</h3>
    }
}